<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="no" indent="yes" media-type="text/html"/>

	<xsl:template match="/">

		<div id="reportContent">
			<h3>Monitored data sources<br/></h3>
			<table>
				<tr class="RowHeader">
					<th>Source name</th>
					<th>Activity</th>
					<th>Status</th>
				</tr>
				<xsl:for-each select="ActivityMonitor/Activity">
					<xsl:variable name="Source" select="@source" />
					<xsl:variable name="Active" select="@active" />
					<xsl:variable name="Hot" select="@hot" />
					
					<tr class="RowData">
						<td>
							<xsl:value-of select="$Source"/>
						</td>
						<xsl:choose>
					    	<xsl:when test="$Active = 'true'">
								<td class="CellActive">
									Active
								</td>
					    	</xsl:when>
					    	<xsl:otherwise>
								<td class="CellPassive">
									Passive
								</td>
					    	</xsl:otherwise>
						</xsl:choose>
						<xsl:choose>
					    	<xsl:when test="$Hot = 'true'">
								<td class="CellError">
									<xsl:value-of select="message"/>
								</td>
					    	</xsl:when>
					    	<xsl:otherwise>
								<td class="CellValid">
									<xsl:value-of select="message"/>
								</td>
					    	</xsl:otherwise>
						</xsl:choose>
					</tr>
				</xsl:for-each>
			</table>
		</div>
	</xsl:template>
</xsl:stylesheet>